<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/layui/layui.css}" rel="stylesheet"/>
<body class="white-bg">
<style>
    .name{
        height: 100px;
        line-height: 100px;
        font-size: 22px;
    }
    .rowTop{
        margin-top: 20px;
    }
    .col-sm-4{
        padding: 0px;
    }
    .col-sm-8{
        padding: 0px;
        padding-left: 10px;
    }
    .col-sm-8>span{
        color: #000000;
    }
    .layui-tab-title .layui-this{
        color: #ffffff;
        background-color: #0e9aef;
    }
</style>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-user-edit" th:object="${user}">
        <input name="userId" type="hidden" th:field="*{userId}"/>
        <input name="deptId" type="hidden" th:field="*{deptId}" id="treeId"/>
        <div class="row rowTop">
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>登录名称</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{loginName}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>校区名称</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{dept.deptName}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>用户名称</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{userName}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>用户邮箱</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{email}"></span>
                </div>
            </div>
        </div>
        <div class="row rowTop">
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>手机号码</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{phonenumber}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>用户性别</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{sex}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>帐号状态</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{status}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>最后登陆IP</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{loginIp}"></span>
                </div>
            </div>
        </div>
        <div class="row rowTop">
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>最后登陆时间</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{loginDate}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>民族</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{ethnic}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>籍贯</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{nativePlace}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>出生年月</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{birthday}"></span>
                </div>
            </div>
        </div>
        <div class="row rowTop">
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>年龄</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{age}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>学历</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{education}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>毕业院校<span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{graduatedSchool}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>参加工作时间</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{joinJobTime}"></span>
                </div>
            </div>
        </div>
        <div class="row rowTop">
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>递交申请书时间</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{applicationTime}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>入党时间</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{partyTime}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>转正时间<span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{positiveTime}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>党内职务</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{partyPosition}"></span>
                </div>
            </div>
        </div>
        <div class="row rowTop">
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>行政职务</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{administrativeDuties}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>技术职称</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{technicalTitles}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>人员状态<span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{personnelStatus}"></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-4 text-center">
                    <span>党内职务</span>
                </div>
                <div class="col-sm-8 text-left">
                    <span th:text="*{partyPosition}"></span>
                </div>
            </div>
        </div>



    </form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<script>
    // $("#form-user-edit").validate({
    //     rules: {
    //         userName: {
    //             required: true,
    //         },
    //         deptName: {
    //             required: true,
    //         },
    //         email: {
    //             required: true,
    //             email: true,
    //             remote: {
    //                 url: ctx + "system/user/checkEmailUnique",
    //                 type: "post",
    //                 dataType: "json",
    //                 data: {
    //                     "userId": function () {
    //                         return $("#userId").val();
    //                     },
    //                     "email": function () {
    //                         return $.common.trim($("#email").val());
    //                     }
    //                 },
    //                 dataFilter: function (data, type) {
    //                     return $.validate.unique(data);
    //                 }
    //             }
    //         },
    //         phonenumber: {
    //             required: true,
    //             isPhone: true,
    //             remote: {
    //                 url: ctx + "system/user/checkPhoneUnique",
    //                 type: "post",
    //                 dataType: "json",
    //                 data: {
    //                     "userId": function () {
    //                         return $("#userId").val();
    //                     },
    //                     "phonenumber": function () {
    //                         return $.common.trim($("#phonenumber").val());
    //                     }
    //                 },
    //                 dataFilter: function (data, type) {
    //                     return $.validate.unique(data);
    //                 }
    //             }
    //         },
    //     },
    //     messages: {
    //         "email": {
    //             remote: "Email已经存在"
    //         },
    //         "phonenumber": {
    //             remote: "手机号码已经存在"
    //         }
    //     },
    //     submitHandler: function (form) {
    //         edit();
    //     }
    // });
    //
    // function submitHandler() {
    //     if ($.validate.form()) {
    //         edit();
    //     }
    // }
    //
    // function edit() {
    //     var userId = $("input[name='userId']").val();
    //     var deptId = $("input[name='deptId']").val();
    //     var userName = $("input[name='userName']").val();
    //     var email = $("input[name='email']").val();
    //     var phonenumber = $("input[name='phonenumber']").val();
    //     var sex = $("#sex option:selected").val();
    //     var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
    //     var roleIds = $.form.selectCheckeds("role");
    //     var ethnic = $("input[name='ethnic']").val();
    //     var nativePlace = $("input[name='nativePlace']").val();
    //     var birthday = $("#birthday").val();
    //     var education = $("#education option:selected").val();
    //     var graduatedSchool = $("input[name='graduatedSchool']").val();
    //     var joinJobTime = $("#joinJobTime").val();
    //     var applicationTime = $("#applicationTime").val();
    //     var partyTime = $("#partyTime").val();
    //     var positiveTime = $("#positiveTime").val();
    //     var partyPosition = $("input[name='partyPosition']").val();
    //     var administrativeDuties = $("input[name='administrativeDuties']").val();
    //     var technicalTitles = $("#technicalTitles option:selected").val();
    //     var personnelStatus = $("#personnelStatus option:selected").val();
    //     /*var postIds = $.form.selectSelects("post");*/
    //     $.ajax({
    //         cache: true,
    //         type: "POST",
    //         url: ctx + "system/user/edit",
    //         data: {
    //             "userId": userId,
    //             "deptId": deptId,
    //             "userName": userName,
    //             "email": email,
    //             "phonenumber": phonenumber,
    //             "sex": sex,
    //             "status": status,
    //             "roleIds": roleIds,
    //             "ethnic": ethnic,
    //             "nativePlace": nativePlace,
    //             "birthday": birthday,
    //             "education": education,
    //             "graduatedSchool": graduatedSchool,
    //             "joinJobTime": joinJobTime,
    //             "applicationTime": applicationTime,
    //             "partyTime": partyTime,
    //             "positiveTime": positiveTime,
    //             "partyPosition": partyPosition,
    //             "administrativeDuties": administrativeDuties,
    //             "technicalTitles": technicalTitles,
    //             "personnelStatus": personnelStatus
    //             //"postIds": postIds
    //         },
    //         async: false,
    //         error: function (request) {
    //             $.modal.alertError("系统错误");
    //         },
    //         success: function (data) {
    //             $.operate.successCallback(data);
    //         }
    //     });
    // }
    //
    // $(function(){
    //     //时间选择器
    //     laydate.render({
    //         elem: '#birthday',trigger: 'click'
    //     });
    //     //时间选择器
    //     laydate.render({
    //         elem: '#joinJobTime',trigger: 'click'
    //     });
    //     //时间选择器
    //     laydate.render({
    //         elem: '#applicationTime',trigger: 'click'
    //     });
    //     //时间选择器
    //     laydate.render({
    //         elem: '#partyTime',trigger: 'click'
    //     });
    //     //时间选择器
    //     laydate.render({
    //         elem: '#positiveTime',trigger: 'click'
    //     });
    //
    // });
    //
    // /*用户管理-修改-选择部门树*/
    // function selectDeptTree() {
    //     var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
    //     var url = ctx + "system/dept/selectDeptTree/" + deptId;
    //     var options = {
    //         title: '选择校区',
    //         width: "380",
    //         url: url,
    //         callBack: doSubmit
    //     };
    //     $.modal.openOptions(options);
    // }
    //
    // function doSubmit(index, layero) {
    //     var tree = layero.find("iframe")[0].contentWindow.$._tree;
    //     if ($.tree.notAllowParents(tree)) {
    //         var body = layer.getChildFrame('body', index);
    //         $("#treeId").val(body.find('#treeId').val());
    //         $("#treeName").val(body.find('#treeName').val());
    //         layer.close(index);
    //     }
    // }
</script>
</body>
</html>
